# This might look like shell script, but it's actually -*- perl -*-
use lib qw(t/ t/m/);

use Test::More qw(no_plan);

use TestUtils;

use HTML::Elemental;


sub tage {

  my $root = "t/html/UL/UL";

  my $tree = HTML::TreeBuilder->new_from_file("$root.initial")->guts;

  my @data = qw(schlitz lowenbrau miller);

  my $UL = HTML::Elemental::UL->new(tree => $tree, ld => [id => 'beers'], preproc => sub { $_[0]->elem->delete_content; }) ;
  for my $data (@data) {
      $UL->simple_add($data);
  }

  my $generated_html = ptree($tree, "$root.gen");

  is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML for same_as");
}


tage();

